package org.example.controller;

import org.example.model.Result;
import org.example.service.BrandService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("brand")
@CrossOrigin("*")
public class BrandController {
    @Resource
    private BrandService brandService;
    @GetMapping
    public Result getBrand(@RequestParam(value="page", defaultValue = "1",required = false) Integer page,@RequestParam(value="limit", defaultValue = "5",required = false) Integer limit){
        return Result.buildSuccess(brandService.getBrandList(page, limit));
    }
}
